<script setup lang="ts">
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import {theme,ConfigProvider} from 'ant-design-vue';

dayjs.locale('zh-cn');

// const locale = ref(zhCN);
// https://github.com/vueuse/head
// you can use this to manipulate the document head in any components,
// they will be rendered correctly in the html results with vite-ssg
useHead({
  title: '营销工具',
  meta: [
    {
      name: 'description',
      content: '营销工具',
    },
    {
      name: 'theme-color',
      content: () => isDark.value ? '#00aba9' : '#ffffff',
    },
  ],
  link: [
    {
      rel: 'icon',
      type: 'image/svg+xml',
      href: () => preferredDark.value ? '/favicon-dark.svg' : '/favicon.svg',
    },
  ],
})
</script>

<template>
  <ConfigProvider
    :theme="{
      algorithm: isDark ? theme.darkAlgorithm : theme.algorithm,
    }"
  >
    <RouterView/>
  </ConfigProvider>
</template>
